home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
551-575
/
disk_561
/
reqtools
/
readme
< prev
next >
Wrap
Text File
|
1992-05-06
|
9KB
|
238 lines
**********************************
reqtools.library
The requester toolkit.
Release 1.0a
(c) 1991 Nico François
**********************************
First of all read the DISTRIBUTION file for information on... er well...
distribution :-)
If you have suggestions or remarks about ReqTools, or if you find any
bugs, please let me know.
Write to the following address:
Nico François
Corbielaan 13
B-3060 Bertem
BELGIUM
Contents
========
1. An introduction
2. Features
3. Installation
4. Using reqtools.library
1. An introduction
==================
reqtools.library is a standard Amiga shared, runtime library. The purpose
of ReqTools is to make it a lot quicker and easier to build standard requesters
into your programs. ReqTools is designed with Commodore's style guidelines in
mind, all requesters have the look-and-feel of AmigaDOS Release 2.
If you use ReqTools in your programs you do not have to worry about
requesters too much. You'll have a lot more time to concentrate on the
really important stuff your program does.
The library has been inspired by req.library (by Colin Fox & Bruce Dawson)
and Commodore's own asl.library. You will find it shares a lot of the
features with these two libraries, while it has some additional ones as well.
While asl.library was great in look-and-feel I felt it lacked quite a bit in
the power department. This power _is_ mostly available in req.library, but
this doesn't fit in too well with AmigaDOS Release 2. So the idea for a new
requester library was born.
I tried to make all requesters in ReqTools very powerful, easy to use and
with a very nice new-look 3D interface. Efficiency was also considered very
important. The 2.0 version of the library is about 20K large. I'm sure you
will agree this is not too much considering what ReqTools offers.
ReqTools features the following requesters: a query requester, a string
requester, a number requester, a file requester, a font requester and a
palette requester.
2. Features
===========
The requesters have following features:
All requesters:
o have a pixel-perfect Workbench 2.0 3D look, also on Kickstart 1.3.
o adjust to interlaced screens and to the screen's font (rtEZRequest,
rtGetLong, rtGetString) or to any fixed-width font if the screen's font
is proportional (rtPaletteRequest, rtFileRequest or rtFontRequest).
o can appear under the mouse pointer, centered on the
screen/in a window or at the top left of the screen/a window.
o can be used asynchronously.
o check pr_WindowPtr of your process is to find the screen they should
appear on (can be overridden).
o use tags for maximum future extendibility. All standard 2.0 tags are
supported (like TAG_SKIP, TAG_MORE, etc.).
o bring the screen they appear on is to the front. The screen that was
in front previously will be put in front again when the requester
finishes (if it is still open).
o will always appear in the visible portion of the screen (support of
virtual screens).
o are extensively tested using enforcer and mungwall debugging tools.
rtEZRequest, the query requester:
o easy keyboard shortcuts:
- Amiga V and Amiga B (like the standard requesters).
- Y for positive response.
- N, R, Esc for negative response.
- Return can also be used as a shortcut and can be
associated with any response. The gadget in question
will have its text printed bold.
Default response for Return is the positive response.
- buttons give visual feedback when keyboard shortcuts
are used.
o number of responses only limited by screen width.
o allows for multiple lines of text.
o text can be centered in requester (great for about requesters).
o supports the use of 'printf' formatting codes in text
and in responses.
o can be terminated by IDCMP events.
rtFileRequest, the file requester:
o similar in use and look-and-feel as Asl file requester.
o buffers directories in memory.
o files and directories can be added or removed from the buffer
by the calling program.
o can be put in save mode, disabling double-clicks and asking you if
directories that can't be found (entered manually) should be created.
o optional callback hook for verification of files before they are
added to the buffer.
o supports multiple selection of files and optionally of directories.
o when multi-select is on All, Clear and Match.. buttons are available.
All selects, and Clear unselects all files. Match.. brings up a
requester where the user can enter a pattern to select files.
o can be used as a directory requester (showing no files).
o optional pattern gadget to match files on.
o shows all devices (with volume names) and all assigns made.
o supports TABCYCLE under 2.0
o pattern matching in supports _ALL_ AmigaDOS 2.0 patterns.
rtFontRequest, the font requester:
o buffers all fonts in memory.
o shows sample of font you click on.
o can be also be used to select the font's style.
o supports color fonts, can change the screen's palette.
o supports scaled fonts (AmigaOS Release 2 only).
o optional callback hook for verification of fonts before they are
added to the buffer.
o supports TABCYCLE under 2.0
rtPaletteRequest, the palette requester:
o features Copy, Swap and Spread functions.
o current values of red, green and blue are displayed.
o returns the selected color.
rtGetLong, the long integer requester:
o width of requester can be set by caller.
o a minimum and maximum can be supplied and will be displayed
in the requester.
o a value to show up when the requester appears can be supplied.
rtGetString, the string requester:
o width of requester can be set by caller.
o a string to show up when the requester appears can be supplied.
3. Installation
===============
To install reqtools.library copy it to your Libs: directory by hand, or
run the installation script 'Install' (by using 'Execute' from the Shell or
by double-clicking its icon).
reqtools.library is provided in two versions (that are 100% equivalent):
one for Kickstart 1.2 (or higher) and one for Kickstart 2.0 and higher.
The version for Kickstart 2.0 uses 2.0 ROM functions for stuff like
pattern matching, parsing tags, the 3D look, while a lot in the Kickstart 1.3
version is emulated. It is therefore suggested you use the 2.0 version of
the library if you have Kickstart 2.0 in ROM.
4. Using reqtools.library
=========================
If you are a C programmer all you need to do is include the correct
headers and open reqtools.library. After that you can use the functions in
the library as if they were C functions. If your program quits it must of
course close the library again. See 'demo.c' for an example.
If you are using SAS/C 5.10a and you don't want to use pragmas, or if you
are using version 4.0 or lower, you must link with LIB:reqtools.lib (small
code) or LIB:reqtoolsnb.lib (large code).
Programmers that use Manx C can use 'Bind' to generate the glue routines
they need (or if they are using 5.0 they can of course use pragmas for in-line
library calls). If somebody out there writes glue routines for Manx they are
welcome, I'll include them with the next distribution of ReqTools.
Note that the functions allowing a variable number of arguments can't
be called using pragmas. So if you use these you must always link with
LIB:reqtools.lib or LIB:reqtoolsnb.lib.
Assembly programmers should also include the correct files and open
reqtools.library. To call a function they must load A6 with the library base,
put the arguments in the appropriate registers and jump to the library vector
offset of the function they want to call.
All library functions are explained in the autodoc file 'reqtools.doc'.
Enjoy.
LIBRARY HISTORY:
*****************************************************************************
RELEASE 1.0 (Library version 37.556 [1.3] - 37.670 [2.0])
First release.
*****************************************************************************
RELEASE 1.0a (Library version 37.557 [1.3] - 37.673 [2.0])
Fixed two minor bugs:
- if a directory could not be found and you re-invoked the file
requester it wouldn't check the directory again.
- devices like PRT:, CON:, etc. now no longer show up in the device
list of the 2.0 file requester.
*****************************************************************************
reqtools.library written by Nico François (Yes, Nico is my first name :-)
(c) 1991 Nico François
//
Thanks to \X/ Amiga for being the best computer ever !